iMacrosControlCreate Method

iMacros Component
Creates an iMacrosControl object which can be added to a Form to play iMacros macros.

Namespace:  iMacros.Component
Assembly:  iMacros.Component (in iMacros.Component.dll) Version: 12.0.501.6698
Syntax

public static iMacrosControl Create(
	string licenseKey
)

Parameters

licenseKey
Type: SystemString
A string containing the license key for the iMacros component

Return Value

Type: iMacrosControl
A reference to an iMacrosControl object
Exceptions

ExceptionCondition
LicenseException Thrown when licenseKey does not match the required license key for this component.
Examples

The example below assumes a Form with a Panel where to add the iMacros control
using System;
using System.Windows.Forms;
using iMacros.Component;

public partial class MainForm : Form
{
    private iMacrosControl iim;

    public MainForm()
    {
        InitializeComponent();
        try
        {   
            iim = iMacrosControl.Create("xxxx") // Use the license key for iMacros.Component
            iim.Dock = DockStyle.Fill;
            browserPane.Controls.Add(iim);
        }
        catch (Exception ex)
        {
            // Create() throws LicenseException, if the license key is not correct
             MessageBox.Show(String.Format("Message: {0}", ex.Message));
        }
    }
}
See Also

Reference